/*****蓝牙常见错误start******/
const NO_LOCATION_AUTH = 99900;
const NO_LOCATION_AUTH_MSG = '请授权定位权限';

const OPEN_ADAPTER_FAIL = 99901;
const OPEN_ADAPTER_FAIL_MSG = '打开蓝牙失败,请确保已开启蓝牙';

const ADAPTER_STATE_FAIL = 99902;
const ADAPTER_STATE_FAIL_MSG = '获取蓝牙适配器状态失败';

const START_DISCOVERY_FAIL = 99903;
const START_DISCOVERY_FAIL_MSG = '开启蓝牙搜索失败';

const SEARCH_TIME_OUT_FAIL = 99904;
const SEARCH_TIME_OUT_FAIL_MSG = '搜索超时';

const CONN_FAIL = 99905;
const CONN_FAIL_MSG = '连接失败';

const GET_SERVICES_FAIL = 99906;
const GET_SERVICES_FAIL_MSG = '获取设备服务失败';

const GET_CHARACTER_FAIL = 99907;
const GET_CHARACTER_FAIL_MSG = '获取设备特征值失败';

const NOTIFY_CHARACTER_FAIL = 99908;
const NOTIFY_CHARACTER_FAIL_MSG = '特征值监听失败';

const WRITE_DATA_FAIL = 99909;
const WRITE_DATA_FAIL_MSG = '向蓝牙写入数据失败';

const STOP_DISCOVERY_FAIL = 99910;
const STOP_DISCOVERY_FAIL_MSG = '停止扫描失败';

const DIS_CONN_FAIL = 99911;
const DIS_CONN_FAIL_MSG = '断开连接失败';

const CLOSE_ADAPTER_FAIL = 99912;
const CLOSE_ADAPTER_FAIL_MSG = '关闭蓝牙失败';

const NO_FOUND_DFU_DEVICE = 99913;
const NO_FOUND_DFU_DEVICE_MSG = '未找到DFU设备';

export const BLE_ERR = {
	NO_LOCATION_AUTH,
	NO_LOCATION_AUTH_MSG,
	OPEN_ADAPTER_FAIL,
	OPEN_ADAPTER_FAIL_MSG,
	ADAPTER_STATE_FAIL,
	ADAPTER_STATE_FAIL_MSG,
	START_DISCOVERY_FAIL,
	START_DISCOVERY_FAIL_MSG,
	SEARCH_TIME_OUT_FAIL,
	SEARCH_TIME_OUT_FAIL_MSG,
	GET_SERVICES_FAIL,
	GET_SERVICES_FAIL_MSG,
	GET_CHARACTER_FAIL,
	GET_CHARACTER_FAIL_MSG,
	NOTIFY_CHARACTER_FAIL,
	NOTIFY_CHARACTER_FAIL_MSG,
	WRITE_DATA_FAIL,
	WRITE_DATA_FAIL_MSG,
	STOP_DISCOVERY_FAIL,
	STOP_DISCOVERY_FAIL_MSG,
	DIS_CONN_FAIL,
	DIS_CONN_FAIL_MSG,
	CLOSE_ADAPTER_FAIL,
	CLOSE_ADAPTER_FAIL_MSG,
	NO_FOUND_DFU_DEVICE,
	NO_FOUND_DFU_DEVICE_MSG
}
/*****蓝牙常见错误end******/

/*****门锁相关配置start******/

const SERVICE_UUID = '6E400001-B5A3-F393-E0A9-E50E24DCCA9E';
const WRITE_UUID = '6E400002-B5A3-F393-E0A9-E50E24DCCA9E';
const NOTIFY_UUID = '6E400003-B5A3-F393-E0A9-E50E24DCCA9E';
const CONTROL_CHARACTER_UUID = '8EC90001-F315-4F60-9FB8-838830DAEA50';
const PACKET_CHARACTER_UUID = '8EC90002-F315-4F60-9FB8-838830DAEA50';
const SEARCH_TIMEOUT = 20000; // 搜索超时时间 单位毫秒
const MTU_SIZE = 20; // 字节
export const YOUON_LOCK_CONF = {
	SERVICE_UUID,
	WRITE_UUID,
	NOTIFY_UUID,
	CONTROL_CHARACTER_UUID,
	PACKET_CHARACTER_UUID,
	SEARCH_TIMEOUT,
	MTU_SIZE
}